const contexts = require.context(`./src/`, true, /\.(vue|jsx)$/)
const _cache = {}
contexts.keys().forEach((key) => (_cache[key] = contexts(key)));
export function getComponentByUrl(name) {
    const getComponentPath = () => _cache[name]
    return new Promise(resolve => {
        resolve(getComponentPath())
    })
}